home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
163_02
/
ungetc.c
< prev
Wrap
Text File
|
1988-01-30
|
384b
|
11 lines
/*
** push a character back into an input stream
*/
#include <streamio.h>
ungetc(c, stream) char c; int *stream; {
if(stream[_IOB_FLAG]&_UNGET) return EOF;
stream[_IOB_FLAG]=(stream[_IOB_FLAG]&255)|(c<<8)|_UNGET;
return c&255;
}